#include <cstdio>

/**
 * https://www.luogu.com.cn/problem/P1307
 */
int main() {
    int x = 0, f = 1;
    char ch = getchar();

    if (ch == '-') {
        f = -1;
        ch = getchar();
    }

    while (ch >= '0' && ch <= '9') {
        x = x * 10 + ch - 48;
        ch = getchar();
    }

    if (x == 0){
        printf("0\n");
        return 0;
    }

    while(x % 10 == 0){
        x /= 10;
    }

    if (f == -1){
        putchar('-');
    }

    while(x){
        printf("%d", x % 10);
        x /= 10;
    }


    return 0;
}